import request from '@/utils/request'

export const reqLogin = (loginForm) => {
  return request({
    method: 'POST',
    url: '/sys/login',
    data: loginForm
  })
}

export const reqGetUserInfo = () => {
  return request({
    method: 'POST',
    url: '/sys/profile'
  })
}

export const reqGetUserImgById = id => {
  return request({
    method: 'GET',
    url: `/sys/user/${id}`
  })
}

export const reqUpdateUserInfo = data => {
  return request({
    method: 'PUT',
    url: `/sys/user/${data.id}`,
    data
  })
}
